package com.gateway.controller;

import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class FallbackHystrixController {

    @GetMapping("/fallbackHystrix")
    public ResponseEntity fallbackHystrix() {
        System.out.println("发送邮件给管理员,进行处理");
        //503
        ResponseEntity response = new ResponseEntity(HttpStatus.SERVICE_UNAVAILABLE);
        return response;
    }
}